<!--
  ~ Copyright (C) 2019 Du-Lab Team <dulab.binf@gmail.com>
  ~
  ~ This program is free software; you can redistribute it and/or
  ~ modify it under the terms of the GNU General Public License
  ~ as published by the Free Software Foundation; either version 2
  ~ of the License, or (at your option) any later version.
  ~
  ~ This program is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~ GNU General Public License for more details.
  ~
  ~ You should have received a copy of the GNU General Public License
  ~ along with this program; if not, write to the Free Software
  ~ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  -->

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>ADAP Alignment</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <link rel="stylesheet" type="text/css" href="/net/sf/mzmine/desktop/impl/helpsystem/HelpStyles.css">
</head>
<body>

<h1>ADAP Aligner</h1>

<p>
    This alignment algorithm has been developed as part of ADAP-GC v1.0, Automatic Data Analysis Pipeline for processing
    GC-MS metabolomics data.
</p>

<p>
    For details, see Jiang, W.; Qiu, Y.; Ni, Y.; Su, M.; Jia, W.; Du, X.: <b>An automated data analysis pipeline for
    GC-TOF-MS
    metabonomics studies.</b> <i>Journal of proteome research</i> 2010, 9 (11), 5974-81
</p>

<h2>Requirements</h2>

<p>
    <strong>ADAP Aligner</strong> requires mass spectra to be constructed prior to the alignment (e.g. using Spectral
    Deconvolution or CAMERA). A typical workflow where this alignment is used can be as following:
</p>
<ol>
    <li><b>Raw data methods / Raw data import</b> imports raw data files</li>
    <li><b>Raw datamethods / Peak detection / Mass detection</b> detects masses in the raw data</li>
    <li><b>Raw datamethods / Peak detection / ADAP Chromatogram builder</b> builds extracted-ion chromatograms</li>
    <li><b>Peak list methods / Peak deteciton / Chromatogram deconvoltion</b> detects peaks (features) in each
        chromatogram
    </li>
    <li><b>Peak list methods / Spectral deconvolution / Multivariate Curve Resolution</b> combines the detected
        peaks (features) into analytes and builds pure fragmentation mass spectra for each analyte
    </li>
    <li><b>Peak list methods / Alignment / ADAP Aligner (GC)</b> aligns the analytes produced by the previous step</li>
    <li><b>Peak list methods / Export/Import / Export to MSP file</b> exports fragmentation mass spectra into
        MSP format
    </li>
</ol>

<h2>Description</h2>

<p>
    <strong>ADAP Aligner</strong> aligns features based on their mass spectra and retention time similarity.
    This approach is different from <strong>Join Aligner</strong> that aligns peaks
    across all samples, using their <em>m/z and retention time</em> similarity. Instead, <strong>ADAP Aligner</strong>
    uses <em>mass spectra and retention time</em> to detect similar features in each sample and align them together.
    Due to the usage of mass spectra, this alignment approach is significantly different from the
    approach of <strong>Join Aligner</strong>. Therefore,
</p>

<p>
    In fact, this algorithm is similar to <strong>Hierarchical Aligner (GC)</strong>, but it uses a different
    clustering method.
</p>

<p>
    Similarity between two features f<sub>1</sub> and f<sub>2</sub> is calculated by the following score:
</p>
<div align="center" style="margin: 10pt">
    S(f<sub>1</sub>, f<sub>2</sub>) = w S<sub>time</sub>(f<sub>1</sub>, f<sub>2</sub>) + (1 - w) S<sub>spec</sub>(f<sub>1</sub>,
    f<sub>2</sub>)
</div>
<p>
    where S<sub>time</sub>(f<sub>1</sub>, f<sub>2</sub>) is the relative retention time difference between two features
    and S<sub>spec</sub>(f<sub>1</sub>, f<sub>2</sub>) is the spectrum similarity between two features.
</p>

<h2>Parameters</h2>

<ul>
    <li><b>Min confidence</b> (number between 0 and 1) is a fraction of the total number of samples. An aligned feature
        must be detected at least in several samples. This parameter determines the minimum number of samples where a
        feature must be detected. The default value is 0.7, so an aligned feature must be observed at least in 70% of
        all samples.
    </li>

    <li><b>Retention time range</b> (minutes) is the maximum allowed retention time difference between aligned features
        from different samples.
    </li>


    <li><b>M/z tolerance</b> is the maximum m/z difference, when two peaks from different mass spectra are considered
        equal.
    </li>

    <li><b>Score threshold</b> (number between 0 and 1) is the minimum value of the similarity function
        S(f<sub>1</sub>, f<sub>2</sub>) required for features to be aligned together. The default value is 0.75.
    </li>

    <li><b>Score weight</b> (number between 0 and 1) is the weight w that is used in the similarity function
        S(f<sub>1</sub>, f<sub>2</sub>). The default value is 0.1.
    </li>

    <li><b>Retention time similarity</b> chooses a method used for calculating the retention time similarity.
        The <b>retention time difference (fast)</b> is preferred method.
    </li>
</ul>

</body>
</html>